﻿//Copyright (C) <2013>  <jonathan cleeve norton> All Rights Reserved 
//Contact jon.norton@fin-plus.co.uk website <http://www.fin-plus.co.uk/>
using System;
using System.ComponentModel;
using FinPlusCommon;
using log = Logger.Logger;

namespace FinPlusComponents
{
    public class FinPlusSimplex : FinPlusComponent
    {
        public override string[] TestStates { get { return new string[] { "TestString", "IsValid" }; } }
        public override IFunctions Adaptor { get { return _adaptor; } }
        public override string TestString { get { return _adaptor.ToString(); } }
       
        private readonly IFinPlusComp _sourceConn;
        private readonly IFunctions _adaptor;

        //construct
        public FinPlusSimplex(IFinPlusComp source)
        {
            _sourceConn = source;
        }
        
        //common control interface
        public override void Dispose()
        {
            if (_sourceConn != null)
                _sourceConn.Dispose();
        }
    }
}
